---
title: "SQL-017: Retrieve benefit payment for schedule (twin class)"
summary: Retrieve benefit payment for schedule (twin class)
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-21
library: SAIF.Business.Claim
reference_type: embedded
---

# SQL-017 Retrieve benefit payment for schedule (twin class)

Retrieves the benefit-payment row associated with a benefit schedule during payment-stop processing; identical logic to `clsActiveBenefitSchedule`.*

## Classification



| Field | Value |
| --- | --- |
| **SQL ID** | SQL-017 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsBenefitSchedule` |
| **Criteria property** | `RetrieveSchedSQL` |
| **Lifecycle method** | `RetrieveBenefitPayments` |

## Parameters



| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `ClaimID` | Input | Decimal | — | Claim identifier |
| `BenefitPaymentSeqNum` | Input | Decimal | — | Benefit payment sequence number |

## Tables



| Table | Access | Columns used |
| --- | --- | --- |
| [CL_BENEFIT_PAYMENT](../database-tables.md#cl_benefit_payment) | SELECT | CLAIM_ID, BENEFIT_PAYMENT_SEQ_NUM |

## Sample SQL

```sql
-- Retrieve benefit payment for schedule
Select CL_BENEFIT_PAYMENT.*
  From CL_BENEFIT_PAYMENT
 Where CLAIM_ID = :ClaimID
   And BENEFIT_PAYMENT_SEQ_NUM = :BenefitPaymentSeqNum
```

## Business rules

- [BR-009: Benefit schedule update must affect a row](../business-rules.md#br-009-benefit-schedule-update-must-affect-a-row)
- [BR-010: Benefit payment delete must affect a row](../business-rules.md#br-010-benefit-payment-delete-must-affect-a-row)

## Sources
- SAIF.Business.Claim/clsBenefitSchedule.vb (not compiled)
